package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerCdkeyGroupCodesDownloadResponse extends BaseQLResponse
{
    /// <summary>
    /// 符合条件的激活码，使用换行符分隔
    /// </summary>
    public String Codes;

    /// <summary>
    /// 满足条件的激活码数量
    /// </summary>
    public long Count;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj.getJSONObject("error_response");
        if (t != null && !t.isNullObject())
        {
            ErrCode = t.getString("code");
            ErrMsg = t.getString("msg");
        }
        else
        {
            t = jsonObj.getJSONObject("butler_cdkey_group_codes_download_response");
            if (t.has("codes"))
                Codes = t.getString("codes");
            if (t.has("count"))
                Count = t.getLong("count");
        }
    }
}
